/**
 * Copyright 2015-2016 eyaomall.cn
 * All rights reserved.
 *
 * @project
 * @author jackey
 * @version 1.0
 * @date 2016-01-06
 */
package com.eyaomall.wxmall.dao;

import org.springframework.stereotype.Repository;

import com.eyaomall.wxmall.model.po.Shop;
import com.lycheeframework.core.annotation.NameSpace;
import com.lycheeframework.core.support.DaoSupport;
/**
 * 店铺Dao
 * @author pro
 *
 */
@Repository
@NameSpace("shop")
public class ShopDao extends DaoSupport<Shop> {

	/**
	 * 根据ID查询店铺详情
	 * @param id
	 * @return
	 */
	public Shop queryById(Integer id){
		Shop shop = new Shop();
		shop.setId(id);
		
		return (Shop) super.query(shop);
	}
	
	/**
	 * 根据微信公众号appid查询店铺详情
	 * @param appId
	 * @return
	 */
	public Shop queryByAppId(String appId){
		Shop shop = new Shop();
		shop.setWxAppId(appId);
		
		return (Shop) super.query(shop);
	}
	
	/**
	 * 根据ID查询店铺详情
	 * @param id
	 * @return
	 */
	public Shop queryShop(Integer id){
		
		Shop shop = new Shop();
		shop.setId(id);
		
		return (Shop) super.query("queryShop",shop);
	}
}
